package astar;

import entity.Position;

public class Node extends Position
{
	private static final long serialVersionUID = 1L;

	private double _DistanceDo;
	private double _DistanceFly;
	private Node _Parent;

	public Node(int pX, int pY)
	{
		super( pX, pY );
	}

	public Node(int pX, int pY, double pDistanceDo)
	{
		super( pX, pY );
		_DistanceDo = pDistanceDo;
	}

	/**
	 * @return the _Value
	 */
	public double getDistanceDo()
	{
		return _DistanceDo;
	}

	/**
	 * @param value
	 *            the _Value to set
	 */
	public void setDistanceDo( double pDistanceDo )
	{
		_DistanceDo = pDistanceDo;
	}

	/**
	 * @return the _DistanceFly
	 */
	public double getDistanceFly()
	{
		return _DistanceFly;
	}

	/**
	 * @param distanceFly
	 *            the _DistanceFly to set
	 */
	public void setDistanceFly( double distanceFly )
	{
		_DistanceFly = distanceFly;
	}

	/**
	 * @return the _Parent
	 */
	public Node getParent()
	{
		return _Parent;
	}

	/**
	 * @param parent
	 *            the _Parent to set
	 */
	public void setParent( Node parent )
	{
		_Parent = parent;
	}

	public double getValue()
	{
		return getDistanceDo() + getDistanceFly();
	}

	public String toString()
	{
		return getX() + " " + getY();
	}
}
